<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib uri="/struts-tags" prefix="s" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>首页</title>
  </head>
  
  <body>
     <h1 align="center">全部主题>>>></h1>
     <table align="center" border="1px" width="500px">
        <tr bgcolor="blue">
          <td>序号</td>
          <td>主题</td>
          <td>投票/查看</td>
          <td>创建时间</td>
        </tr>
	        <s:iterator value="slist"  status="index">
	         <s:if test="#index.odd==true">
	         <tr bgcolor="pink">
	        </s:if>
	          <td><s:property value="id"/></td>
	          <td><a href="option_byid.action?subject.id=<s:property value="id"/>"><s:property value="title"/></a></td>
	          <td><s:property value="totalVotes"/>/<s:property value="viewTimes"/></td>
	          <td><s:date name="createDate" format="yyyy-MM-dd"/></td>
	        </tr>
	        </s:iterator>
     </table>
  </body>
</html>
